package cocoaas3.nd2d{

	import de.nulldesign.nd2d.display.*;
	import cocoaas3.*;

	public class UIView extends Sprite2D {

		//
		// original member
		//
		public var frame:CGRect;

		// A Boolean value that determines whether subviews are confined to the bounds of the receiver.
		public var clipsToBounds:Boolean = false;

		//
		// custom member
		//
		public var subviewContainer:Node2D = new Node2D();// UIScrollViewなどで使う
		public var background_mc:Sprite2D = new Sprite2D();


		public function UIView(){
			//// UIScrollViewなどのタッチ判定用に、透明の背景を作る
			//var shape = new Shape();
			//var g:Graphics = shape.graphics;
			//g.beginFill( 0xFF0000, 0 );	// 面のスタイル設定
			//g.drawRect( 0, 0, 100, 100 );
			//background_mc.addChild(shape);

			addChild( background_mc );
			addChild( subviewContainer );
		}




		//
		// original functions
		//
		public function addSubview( view:Node2D ):void{
			subviewContainer.addChild( view );
		}
	}
}